/**
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
*
* SdProjectUniversalChangeServiceAuto
* 项目变更通用
*
* 修改纪录
* 2021-12-20 版本：1.0 wangxinhua 创建。
* @version 版本：1.0
* @author 作者：wangxinhua
* 创建日期：2021-12-20
*/

package com.topscomm.gpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.gpm.*;
import com.topscomm.gpm.pojo.GpmProjectUniversalChangeEntity;
import com.topscomm.gpm.dao.IGpmProjectUniversalChangeDao;


public class GpmProjectUniversalChangeServiceAuto extends GpmService<GpmProjectUniversalChangeEntity, IGpmProjectUniversalChangeDao> {

	/**
	 * @author: wangxinhua
	 * @date: 2021-12-20
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("flowid") != null) {
			temp = mapRow.get("flowid").toString();
			mapRow.put("dispflowid", datacodeCache.getValueDynamic("ApprovalFlow_GpmProjectUniversalChange", temp, "id", "name"));
		}
		if (mapRow.get("state") != null) {
			temp = mapRow.get("state").toString();
			mapRow.put("dispstate", datacodeCache.getValueDynamic("TapApprovalBillState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("sourcetype") != null) {
			temp = mapRow.get("sourcetype").toString();
			mapRow.put("dispsourcetype", datacodeCache.getValueDynamic("GpmUniversalChangeSourceType", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "sdProjectUniversalChangeDao")
	public void setDao(IBasicDao<GpmProjectUniversalChangeEntity> dao) {
		super.setDao(dao);
	}
}
